def isPerfectNumber(n):
    if n<=0:
             return None
    else:
        s=0
        for i in range(1,n+1):
            if n%i==0:
                s += i
            if s==n:
                return True
e=eval(input("输入一个值"))
print(isPerfectNumber(e))